<%- @page_title = _('Viewing Deadline "%s" for %s', h(@deadline.title), h(@teaching.title)) -%>
<h2><%= h(@deadline.title) %> for <%= h(@teaching.title) %>
  <%- if @logged_user.is_teacher? -%>
    <span class="quick-tip"><%= link_to(_('Edit'), edit_class_path(@project, @teaching)) %></span>
  <%- end -%>
</h2>
<div class="formatted-text"><!--O .formatted-text-->
  <p><strong>End:</strong> <%= @deadline.end.formatted %></p>
  <%- unless @deadline.description.blank? -%>
    <hr />
    <%= simple_format(h(@deadline.description)) %>
  <%- end -%>
</div><!--C .formatted-text-->
<%- if @logged_user.is_teacher? -%>
  <hr />
  <%- form_tag(deadline_path(@project, @teaching, @deadline),
                :method => :delete,
                :onsubmit => "if(confirm('#{_('Are you sure you want to delete this deadline?')}')){Field.disable('submit-form'); return true;}else{return false;}") do -%>
    <%= submit_tag(_('Delete this deadline'),
                    :class => 'button',
                    :id => 'submit-form') %>
  <%- end -%>
<%- end -%>
<hr />
<%= link_to(_("&laquo; View all deadlines"), deadlines_path(@project, @teaching)) %>